package com.dragon.client.controller.customer;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dragon.common.model.ResponseData;
import com.dragon.logical.service.customer.IOperationRecordService;
import com.dragon.repository.domain.dto.OperationRecordDTO;
import com.dragon.repository.entity.OperationRecord;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * “项目操作记录” 前端控制器
 * </p>
 *
 * @author sy
 * @since 2023-06-30
 */
@RestController
@RequestMapping("operationRecord")
@Api(tags = "操作记录")
public class OperationRecordController {

    @Autowired
    IOperationRecordService service;

//    @GetMapping("page")
//    @ApiOperation(value = "分页列表")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "projectId",required = false,type = "int",value = "项目id"),
//            @ApiImplicitParam(name = "customerId",required = false,type = "int",value = "客户id"),
//            @ApiImplicitParam(name = "page",required = true,type = "int",value = "页码"),
//            @ApiImplicitParam(name = "limit",required = true,type = "int",value = "条数"),
//    })
//    public ResponseData<List<OperationRecordDTO>> selectPageList(@RequestParam(required = false) Integer projectId, @RequestParam(required = false) Integer customerId, @RequestParam Integer page, @RequestParam Integer limit){
//        Page<OperationRecord> result =  service.selectPageList(projectId, customerId, page, limit);
//        return ResponseData.success(OperationRecordDTO.convertList(result.getRecords()),result.getTotal());
//    }

}
